import reuquest from '@/utils/request.js'

// 微信登录（静默登录)
export const wxLoginApi = (data = {}, options = { loading: false, noAuth: true }) => {
	return reuquest.post('/apiapp/v1/myuser/wx_login', data, options)
}

// 微信授权手机登录
export const wxPhoneLoginApi = (data = {}, options = { loading: false, noAuth: true }) => {
	return reuquest.post('/apiapp/v1/myuser/wx_phone_login', data, options)
}

// 绑定/更换微信
export const bindWxUserApi = (data = {}, options = { loading: false, noAuth: true }) => {
	return reuquest.post('/apiapp/v1/myuser/bind_wxuser', data, options)
}

// 绑定/更换手机(微信授权)
export const bindWxPhoneApi = (data = {}, options = { loading: false, noAuth: true }) => {
	return reuquest.post('/apiapp/v1/myuser/bind_wx_phone', data, options)
}

// 设置用户头像与名字
export const setUserInfoApi = (data = {}, options = { loading: false, noAuth: true }) => {
	return reuquest.post('/apiapp/v1/myuser/set_user', data, options)
}

// 我的信息
export const myInfoApi = (data = {}, options = { loading: false, noAuth: true }) => {
	return reuquest.get('/apiapp/v1/myuser/myinfo', data, options)
}

// 安全退出
export const layoutApi = (data = {}, options = { loading: false, noAuth: true }) => {
	return reuquest.get('/apiapp/v1/myuser/exit', data, options)
}
